package WWW.SST.LIB;

/** 
 Auto ��ժҪ˵����
*/
public class Auto
{
	public Auto()
	{
		//
		// TODO: �ڴ˴���ӹ��캯���߼�
		//
	}
	public static void RunStatus()
	{

		String s = "";
		boolean todayLog = false;
		int PreDay = 0;

		for (int i = 0;i < 2000000;i++)
		{
			//reset log
			if (PreDay != java.time.LocalDateTime.now().getDayOfMonth())
			{
				todayLog = false;
			}

			//set log
			if (PreDay != java.time.LocalDateTime.now().getDayOfMonth() && todayLog == false)
			{

				s = MOLE.Drive.GetFreeSpace("c") + "<br>";
				s += MOLE.Drive.GetFreeSpace("d") + "<br>";
				s += MOLE.Drive.GetFreeSpace("e") + "<br>";
				try
				{
					String rnd = MOLE.comm.getRandom(5);
					String Dbcount = MOLE.SQL.GetDataTableuniquetempvar.Rows[0]["n"].toString();
					s += " daigou count:" + Dbcount + "<br>";
				}
				catch (RuntimeException ee)
				{
					s += "get daigou count err:" + ee.toString() + "<br>";
				}

				//send to zhui.
				try
				{
					MOLE.Email.send("prisco@gmail.com", "serveice status detail. ", s);
					s += "send to  prisco@gmail.com  ok<br>";
				}
				catch (java.lang.Exception e)
				{
					s += "send to  prisco@gmail.com  file,sys err<br>";
				}
				//send to  me.
				try
				{
					MOLE.Email.send("attilax@qq.com", "serveice status detail. ", s);
				}
				catch (java.lang.Exception e2)
				{
					s += "send to  attilax@qq.com file,sys err<br>";
				}

				PreDay = java.time.LocalDateTime.now().getDayOfMonth();
				todayLog = true;
			}
			 Thread.sleep(5000);
		}
	}

}